package com.gitee.dufafei.spark.pattern

case class Optional[T](value: Option[T]) {

  def ifPresent(f: T => Unit): Unit = if (value.isDefined) f(value.get)
}
